﻿<UserControl x:Class="EpiDashboard.StatCalc.ChiSquareControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="500" d:DesignWidth="500">
<Grid Background="White" Width="500">
        <GroupBox Margin="0,0,5,0">
            <GroupBox.Header>
                <TextBlock FontWeight="Bold">StatCalc - Chi Square for Trend</TextBlock>
            </GroupBox.Header>
            <StackPanel x:Name="pnlMainContent" Background="White">
                <StackPanel.ContextMenu>
                    <ContextMenu>
                        <MenuItem x:Name="mnuSave" Header="Save As Image..."/>
                        <MenuItem x:Name="mnuPrint" Header="Print..."/>
                    </ContextMenu>
                </StackPanel.ContextMenu>
                <TextBlock Padding="15" FontWeight="Bold" TextWrapping="Wrap" HorizontalAlignment="Center">Analysis For Linear Trends In Proportions</TextBlock>
                <Grid Grid.Column="1" HorizontalAlignment="Center">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="110" />
                        <ColumnDefinition Width="110" />
                        <ColumnDefinition Width="110" />
                        <ColumnDefinition Width="110" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="30"/>
                    </Grid.RowDefinitions>
                    <Rectangle Grid.Column="0" Grid.Row="0" Fill="{x:Static SystemColors.MenuHighlightBrush}" Stroke="Black"/>
                    <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="0" Grid.Row="0" FontWeight="Bold" Foreground="White">Exposure Score</TextBlock>

                    <Rectangle Grid.Column="1" Grid.Row="0" Fill="{x:Static SystemColors.MenuHighlightBrush}" Stroke="Black"/>
                    <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="1" Grid.Row="0" FontWeight="Bold" Foreground="White">Cases</TextBlock>

                    <Rectangle Grid.Column="2" Grid.Row="0" Fill="{x:Static SystemColors.MenuHighlightBrush}" Stroke="Black"/>
                    <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="2" Grid.Row="0" FontWeight="Bold" Foreground="White">Controls</TextBlock>

                    <Rectangle Grid.Column="3" Grid.Row="0" Fill="{x:Static SystemColors.MenuHighlightBrush}" Stroke="Black"/>
                    <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="3" Grid.Row="0" FontWeight="Bold" Foreground="White">Odds Ratio</TextBlock>
                </Grid>
                <ScrollViewer x:Name="scrlViewer" MaxHeight="165" VerticalScrollBarVisibility="Auto">
                    <Grid x:Name="grdMain" Grid.Column="1" HorizontalAlignment="Center">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="110" />
                            <ColumnDefinition Width="110" />
                            <ColumnDefinition Width="110" />
                            <ColumnDefinition Width="110" />
                        </Grid.ColumnDefinitions>
                    </Grid>
                </ScrollViewer>
                <Button x:Name="btnAddRow" Content="Add Row" Height="30" Width="55" HorizontalAlignment="Right" Margin="0,10,22,0"/>
                <Grid Margin="20" Width="300">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="40"/>
                        <RowDefinition Height="40"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition Width="120"/>
                    </Grid.ColumnDefinitions>
                    <Rectangle Grid.Column="0" Grid.Row="0" Fill="{x:Static SystemColors.MenuHighlightBrush}" Stroke="Black"/>
                    <TextBlock Grid.Row="0" Grid.Column="0" FontWeight="Bold" Foreground="White" Margin="5" VerticalAlignment="Center">Chi Square for linear trend<LineBreak/>(Extended Mantel-Haenszel)</TextBlock>
                    <Rectangle Grid.Column="0" Grid.Row="1" Fill="{x:Static SystemColors.MenuHighlightBrush}" Stroke="Black"/>
                    <TextBlock Grid.Row="1" Grid.Column="0" FontWeight="Bold" Foreground="White" Margin="5" VerticalAlignment="Center">p value</TextBlock>
                    <Rectangle Grid.Column="1" Grid.Row="0" Stroke="Black"/>
                    <TextBlock x:Name="txtChiSquare" Grid.Row="0" Grid.Column="1" FontFamily="Microsoft Sans Serif" FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center">...</TextBlock>
                    <Rectangle Grid.Column="1" Grid.Row="1" Stroke="Black"/>
                    <TextBlock x:Name="txtPValue" Grid.Row="1" Grid.Column="1" FontFamily="Microsoft Sans Serif" FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center">...</TextBlock>
                </Grid>
            </StackPanel>
        </GroupBox>
        <Image x:Name="imgClose" Source="..\Images\x.png" HorizontalAlignment="Right" VerticalAlignment="Top" Stretch="None" />
    </Grid>
</UserControl>
    